package com.platform.qujia.service.impl;

import com.platform.qujia.service.WxTemplateParamsGeneral;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component("wxTemplateOilPriceChange")
public class WxTemplateOilPriceChangeParams implements WxTemplateParamsGeneral {

    @Override
    public void setWxTemplateContent(List<String> contents, Map<String, String> templateParams, Map<String, Map<String, String>> data) {
        if (contents.contains("操作类型")) {
            data.put("thing5", Collections.singletonMap("value", templateParams.get("detail")));
        }
        if (contents.contains("操作金额")) {
            data.put("amount2", Collections.singletonMap("value", templateParams.get("priceChange")));
        }
        if (contents.contains("时间")) {
            data.put("time6", Collections.singletonMap("value", templateParams.get("effectdate")));
        }
    }
}
